home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / bbsutil / cntm092b.zip / COUNTEM.DOC < prev    next >
Text File  |  1991-09-30  |  10KB  |  304 lines

  1.  
  2.  
  3.  
  4.  
  5.            ╓─────╖                       ╥─────╖
  6.            ║                             ║
  7.            ║       ╓──╖ ╥  ╥ ╓─╖ ╥ ╓─╥─╖ ╟──     ╓─╥─╖    ║
  8.            ║       ║  ║ ║  ║ ║ ║ ║   ║   ║       ║ ║ ║    ║
  9.            ╙─────╜ ╙──╜ ╙──╜ ╨ ╙─╜   ╨   ╨─────╜ ╨ ╨ ╨    o
  10.  
  11.  
  12.                              Version 0.92ß
  13.  
  14.  
  15.  
  16.  
  17.                PCBoard 14.5a DIR File Summary Generator
  18.  
  19.  
  20.  
  21.  
  22.                    Copyright 1991 by Michael Nelson
  23.  
  24.                          Sysop of SeaHunt BBS
  25.  
  26.                 FidoNet 1:125/20 and RBBSNet 8:914/501
  27.  
  28.                             October 1, 1991
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.     Countem  is  a  utility  to  generate summaries of your downloadable
  36. files  directories.   It  will  scan  your  PCBoard  system  files   and
  37. determine  which  conferences  need  to  have  DIR  files made, and will
  38. automatically  generate   them  for   you.   In   doing  this,   several
  39. assumptions are made:
  40.  
  41.     1)  Although  CountEm  opens  the  PCBoard  system  files  in  SHARE
  42. compatible mode, and CountEm does  not write to any system  files except
  43. the DIR files themselves, you should still make sure all nodes are  DOWN
  44. prior to running CountEm.  If a caller is on and that caller is  reading
  45. a DIR  file when  CountEm attempts  to write  to it,  you'll get a SHARE
  46. violation, (assuming  you have  SHARE.EXE loaded).   If you  DON'T  have
  47. SHARE loaded, bad things could happen.   So, the moral of the story  is,
  48. make sure all nodes are DOWN prior to running CountEm.
  49.  
  50.     2) There  isn't much  error checking  on the  COUNTEM.CFG file.   An
  51. example COUNTEM.CFG file is included in this archive.  Please modify  it
  52. to suit  your needs.   As long  as you  use an  ASCII text  file  editor
  53. (QEdit  works  fine,  I  use  Brief  and MultiEdit), and don't do stupid
  54. things  like  putting  in  a  255  character  name for your BBS, nothing
  55. should go  wrong.   Make SURE  the format  of your  finished file is the
  56. same as in the example file.
  57.  
  58.     3) When changing the colors, please make sure you use VALID  PCBoard
  59. 14.5  color  codes.   If  you  don't,  the  program  will,  most likely,
  60. misbehave.  There is NO error checking  on the color codes.  If you  put
  61. in valid  codes, you'll  get valid  colors.   On the  next page  of this
  62. document is an excerpt from Clark Development Corp's bulletin  "X-CODES"
  63. (available from SaltAir), showing the valid color codes.
  64.  
  65.  
  66.  
  67.                      -=- PCBoard Color Codes -=-
  68.  
  69.     The @x-color codes correspond to your regular PC display codes.
  70.  
  71.     For instance, a 1 is blue, a 2 is green a 3 is cyan and so on.
  72.  
  73.     The same  numbers are  used for  background colors  except that they
  74. are shifted left four  bits (to the upper  "nibble" of the byte  if that
  75. means anything to you).   It's easy to picture  when you think of  it in
  76. HEX rather than decimal numbers like this:
  77.  
  78.     Background (first digit)      Foreground (second digit)
  79.     ------------------------      -------------------------
  80.     Black   =  0                   Black   =  0
  81.     Blue    =  1                   Blue    =  1
  82.     Green   =  2                   Green   =  2
  83.     Cyan    =  3                   Cyan    =  3
  84.     Red     =  4                   Red     =  4
  85.     Magenta =  5                   Magenta =  5
  86.     Yellow  =  6                   Yellow  =  6
  87.     White   =  7                   White   =  7
  88.  
  89.     Background w/Blinking          High Intensity Foregounds
  90.  
  91.     Black   =  8                   Black   =  8
  92.     Blue    =  9                   Blue    =  9
  93.     Green   =  A                   Green   =  A
  94.     Cyan    =  B                   Cyan    =  B
  95.     Red     =  C                   Red     =  C
  96.     Magenta =  D                   Magenta =  D
  97.     Yellow  =  E                   Yellow  =  E
  98.     White   =  F                   White   =  F
  99.  
  100. Examples:
  101.     Bright White on Blue Background        = 1F  (1=blue,F=white)
  102.     Bright Yellow on Green Background      = 2E  (2=green,E=yellow)
  103.     Dark Blue blinking on White Background = F1  (F=white,1=blue)
  104.  
  105.     See how  the number  in the  left colomn  represents the  background
  106. while the number  in the right  column represents the  foreground?  That
  107. is a whole  lot easier to  remember than to  think of "blue  background"
  108. being equal to 16, "green background" equal to 32 and "cyan  background"
  109. equal to 48 which is what you'd have in decimal.
  110.  
  111.  
  112.  
  113.     Combining colors  then is  much easier  to visualize  as well  - for
  114. instance YELLOW foreground on a BLUE background would be:
  115.  
  116.         1E   - where 1=BLUE and E=bright yellow
  117.  
  118.     Instead of thinking of yellow on  blue as being the number 30  which
  119. doesn't make any sense at all.
  120.  
  121.     Okay, now to practice what we've learned:
  122. @X00
  123.         @x1E = @X1EYELLOW ON BLUE@XFF
  124.         @x2F = @X2FWHITE ON GREEN@XFF
  125.         @x31 = @X31BLUE ON CYAN@XFF
  126.  
  127.  
  128.  
  129. The COUNTEM.CFG file:
  130. ---------------------
  131.  
  132.     The format  of COUNTEM.CFG  is critical  to your  success in running
  133. the program.  Here's what a sample COUNTEM.CFG looks like:
  134.  
  135. C:\PCB
  136. S e a H u n t  B B S
  137. @X06
  138. @X0D
  139. @X0F
  140. @X0B
  141. @X07
  142. @X0E
  143. @X0E
  144. @X0F
  145. @X03
  146. @X0B
  147. @X03
  148. ;------------------------------------------------------------------
  149. ;                       Countem Configuration File
  150. ;                          for Countem v0.92ß
  151. ;
  152. ; Notes:
  153. ;       You can put comments in this file, as long as they are below the
  154. ;       dashed line above, and as long as they have a semicolon in column
  155. ;       number 1.
  156. ;
  157. ;       There should be NO BLANK LINES in this file
  158. ;
  159. ;       CountEm v0.92ß requires the addition of line 13!!
  160. ;
  161. ;
  162. ; Line 1:       Path to PCBOARD.DAT file (no trailing backslash, pls!!)
  163. ; Line 2:       BBS Name for DIR header
  164. ; Line 3:       Line drawing character color
  165. ; Line 4:       BBS Name color
  166. ; Line 5:       DIR Title color
  167. ; Line 6:       Header color
  168. ; Line 7:       Normal color (default is X07, light grey on black)
  169. ; Line 8:       Directory Number color
  170. ; Line 9:       Conference Name color
  171. ; Line 10:      Directory Description color
  172. ; Line 11:      File Count Color
  173. ; Line 12:      File Size Color
  174. ; Line 13:      TimeStamp Color (NEW in v0.92ß)
  175.  
  176.  
  177.  
  178. ErrorLevels:
  179. ------------
  180.  
  181.     To make usage in batch files more convenient, CountEm will exit
  182. with various different "errorlevels".  An errorlevel of "0" indicates
  183. that the program exited normally.  Any other errorlevel returned by the
  184. program indicates a problem of one sort or another.  The errorlevels
  185. returned by CountEm are:
  186.  
  187.         99 = Error Opening a File
  188.         98 = Syntax Error - Bad Command Line
  189.         97 = Error Closing a File
  190.         96 = Error Reading a File
  191.         95 = Too Many Conferences to Process
  192.         94 = Too Many Directories to Process
  193.         93 = Unable to Allocate Required Memory
  194.          0 = Normal Exit
  195.  
  196.     So, you can trap these errorlevels in a batch file and take
  197. appropriate action if something goes wrong.  Proper trapping of
  198. errorlevels in your batch file should help you sleep better at night!
  199. There's a sample batch file you might call CNT.BAT on the next page.
  200.  
  201.  
  202.  
  203.     Remember that you need to check errorlevels in descending order.  A
  204. typical batch file to run CountEm in your event might look like this:
  205.  
  206.     @ECHO OFF
  207.     C:
  208.     CD\PCB
  209.  
  210.     COUNTEM COUNTEM.CFG
  211.  
  212.     IF ERRORLEVEL 99 GOTO FILE
  213.     IF ERRORLEVEL 98 GOTO COMMAND
  214.     IF ERRORLEVEL 97 GOTO CLOSE
  215.     IF ERRORLEVEL 96 GOTO READ
  216.     IF ERRORLEVEL 95 GOTO CONF
  217.     IF ERRORLEVEL 94 GOTO DIRS
  218.     IF ERRORLEVEL 93 GOTO MEM
  219.     IF ERRORLEVEL 0  GOTO NORM
  220.  
  221.     :FILE
  222.         ECHO COUNTEM UNABLE TO OPEN FILE! > COUNTEM.LOG
  223.         GOTO END
  224.  
  225.     :COMMAND
  226.         ECHO COUNTEM SYNTAX ERROR! > COUNTEM.LOG
  227.         GOTO END
  228.  
  229.     :CLOSE
  230.         ECHO COUNTEM WAS UNABLE TO CLOSE A FILE! > COUNTEM.LOG
  231.         GOTO END
  232.  
  233.     :READ
  234.         ECHO COUNTEM WAS UNABLE TO READ A FILE! > COUNTEM.LOG
  235.         GOTO END
  236.  
  237.     :CONF
  238.         ECHO COUNTEM REPORTED TOO MANY CONFERENCES! > COUNTEM.LOG
  239.         GOTO END
  240.  
  241.     :DIRS
  242.         ECHO COUNTEM REPORTED TOO MANY DIRECTORIES! > COUNTEM.LOG
  243.         GOTO E